package jisuan4h9t;

import java.util.Scanner;

public class jk {
    public static void main(String[] args) {
        int j,t;
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入鸡兔的总数：");
        int n=scanner.nextInt();
        System.out.println("请输入鸡兔的腿总数：");
        int m=scanner.nextInt();
        jito(n, m);
    }

    public static void jito(int n,int m) {
        int count=1;//鸡
        for ( count = 1; count <n; count++) {
            if ((count*2+(n-count)*4)==m) {
                System.out.println(count);
                System.out.println(n-count);
            }else {
                System.out.println("NO answer");
            }
        }
    }
}
